Sub PrintTable()
Dim cmd1 As ADODB.Command
Dim rst1 As ADODB.Recordset
Dim str1 As String
Dim fld1 As ADODB.Field

'Specify a command, then execute it
Set cmd1 = New ADODB.Command
With cmd1
   .ActiveConnection = CurrentProject.Connection
   .CommandText = "SELECT FirstName, LastName, Email FROM MEMBERS"
   .CommandType = adCmdText
End With

'Set rst1 to the recordset returned by the command,
'then print the recordset
Set rst1 = cmd1.Execute
Do Until rst1.EOF
     str1 = ""
     For Each fld1 In rst1.Fields
          str1 = str1 & fld1.Value & vbTab
     Next fld1
     Debug.Print str1
     rst1.MoveNext
Loop

'Clean up before exiting
rst1.Close
Set fld1 = Nothing
Set rst1 = Nothing
Set cmd1 = Nothing

End Sub
